/* ex01.c -- Rewrite the program in Listing 12.4
 * so that it does not use global variables. */
// Listing 12.4 => chapter12/global.c

#include <stdio.h>

void critic(int* punits);

int main(void) {
  int units = 0;
  printf("How many pounds to a firkin of butter?\n");
  scanf("%d", &units);
  while (units != 56) {
    critic(&units);
  }
  printf("You must have looked it up!\n");

  return 0;
}

void critic(int* punits) {
  printf("No luck, my friend. Try again.\n");
  scanf("%d", punits);
}
